package priv.ljh.operate.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

public interface BookMapper {
    @Insert("insert into info(title,add_time,good_no,stock_quantity,market_price,sell_price) " +
            "value (#{title},#{add_time},#{good_no},#{stock_quantity},#{market_price},#{sell_price})")
    int insertBook(@Param("title") String title,
                   @Param("add_time") Date add_time,
                   @Param("good_no") String good_no,
                   @Param("stock_quantity") int stock_quantity,
                   @Param("market_price") String market_price,
                   @Param("sell_price") String sell_price);
    @Insert("insert into goods(title,add_time,zhaiyao,click,img_url,stock_quantity,market_price,sell_price) " + "value(#{title},#{add_time},#{zhaiyao},#{click},#{img_url},#{stock_quantity},#{market_price},#{sell_price})")
    int insertBookInfo(@Param("title") String title,
                   @Param("add_time") Date add_time,
                   @Param("zhaiyao") String zhaiyao,
                   @Param("click") int click,
                   @Param("img_url") String img_url,
                   @Param("stock_quantity") int stock_quantity,
                   @Param("market_price") String market_price,
                   @Param("sell_price") String sell_price);
    @Insert("insert into desc1(title,content) value(#{title},#{content})")
    int insertDesc(@Param("title") String title,@Param("content") String content);


    @Insert("insert into imagesplus(src1,src2) value(#{src1},#{src2})")
    int insertImagesplus(@Param("src1") String src1,@Param("src2") String src2);
}
